// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0

package Tracking;

/**
 *
 * @author Administrator
 */
public final class RouteData implements java.lang.Cloneable
{
    /**
     *
     */
    public TruckData[] Trucks;

    /**
     *
     */
    public RouteData()
    {
    }

    /**
     *
     * @param Trucks
     */
    public RouteData(TruckData[] Trucks)
    {
        this.Trucks = Trucks;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        RouteData _r = null;
        try
        {
            _r = (RouteData)rhs;
        }
        catch(ClassCastException ex)
        {
        }

        if(_r != null)
        {
            if(!java.util.Arrays.equals(Trucks, _r.Trucks))
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 0;
        if(Trucks != null)
        {
            for(int __i0 = 0; __i0 < Trucks.length; __i0++)
            {
                if(Trucks[__i0] != null)
                {
                    __h = 5 * __h + Trucks[__i0].hashCode();
                }
            }
        }
        return __h;
    }

    public java.lang.Object
    clone()
    {
        java.lang.Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    /**
     *
     * @param __os
     */
    public void
    __write(IceInternal.BasicStream __os)
    {
        trucklistHelper.write(__os, Trucks);
    }

    /**
     *
     * @param __is
     */
    public void
    __read(IceInternal.BasicStream __is)
    {
        Trucks = trucklistHelper.read(__is);
    }
}
